
<!--修改弹出框-->
<div class="wizard" id="wizard-est">
    <form method="post">
        <h1>修改订单执行状态</h1>
        <div class="wizard-card" data-onValidated="setServerName" data-cardname="name">
            <h3><span>修改订单执行状态</span></h3>
            <input type="hidden" name="oid_exec_est">
            <div class="wizard-input-section">
                <div class="form-group">
                    <label>软件版本号</label>
                    <input type="text" class="form-control" name="soft_version_est" id="soft_version_est" data-validate=""/>
                </div>
                <div class="form-group">
                    <label>硬件版本号</label>
                    <input type="text" class="form-control" name="hard_version_est" id="hard_version_est" data-validate=""/>
                </div>
                <div class="form-group">
                    <label>发货状态</label>
                    <select name="is_status_est" id="is_status_est" class="form-control">
                        <option value="1">已发货</option>
                        <option value="0">未发货</option>·
                    </select>
                </div>
                <div class="form-group">
                    <label>生产数据校验</label>
                    <select class="form-control" name="data_verify_est" id="data_verify_est" data-validate="">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>客户名称</label>
                    <input type="text" class="form-control" readonly name="client_est" id="client_est" data-validate=""/>
                </div>
                <div class="form-group">
                    <label>下单联系人</label>
                    <input type="text" class="form-control" readonly name="order_placer_est" id="order_placer_est" data-validate=""/>
                </div>
                <div class="form-group">
                    <label>订单评审号</label>
                    <input type="text" class="form-control" readonly name="oid_edit_est" id="oid_edit_est" data-validate=""/>
                </div>

            </div>
        </div>

    </form>
</div>
<!--修改弹出框-->
<script src="__JS__/jquery.js"></script>
<script type="text/javascript">
    function estatus(oid_exec) {
        $.post("{:url('Execorder/onestatus')}",{oid_exec:oid_exec},function(data){
            if(data) {
                $("input[name='oid_exec_est']").val(data[0].oid_exec);
                $("input[name='oid_edit_est']").val(data[0].oid);
                /*基本信息*/
                $("input[name='client_est']").val(data[0].client);

                /*表计参数*/
                $("input[name='meter_type_est']").val(data[0].meter_type);
                // $("input[name='meter_num_est']").val(data[0].meter_num)
                $("input[name='order_placer_est']").val(data[0].order_placer);
                // $("input[name='model_type_est']").val(data[0].model_type);
                $("select[name='is_status_est']").val(data[0].is_status);
                $("select[name='data_verify_est']").val(data[0].data_verify);

                //软件版本号+硬件版本号
                $("input[name='soft_version_est']").val(data[0].soft_version);
                // $("input[name='meter_num_est']").val(data[0].meter_num)
                $("input[name='hard_version_est']").val(data[0].hard_version);
            }
        },'json');

        foreditstatus.show()
        $('.wizard-cancel').text('取消');
        $('.wizard-cancel').addClass('calCancel')
        $('.wizard-back').addClass('forhid')
        $('.wizard-next').text('确定');

        foreditstatus.on("submit", function(wizard) {
            setTimeout(function() {
                wizard.trigger("success");
                wizard.hideButtons();
                wizard._submitting = false;
                wizard.showSubmitCard("success");
                wizard.updateProgressBar(0);
            }, 3000);
            est();
            foreditstatus.reset().close();
            //刷新页面
            window.location.reload();
        });

    }
    function est() {
        var oid_exec = $("input[name='oid_exec_est']").val();
        var soft_version = $("input[name='soft_version_est']").val();
        var hard_version = $("input[name='hard_version_est']").val();
        var is_status = $("select[name='is_status_est']").val();
        var data_verify = $("select[name='data_verify_est']").val();
        var data = {'oid_exec':oid_exec,'is_status':is_status,'hard_version':hard_version,
            'soft_version':soft_version,'data_verify':data_verify};
        //console.log(data)
        $.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "{:url('Execorder/esta')}",//url
            data: data,
            success: function (result) {
                //console.log(result)
                var code = result.code
                var msg = result.msg
                changeText(msg, code)
                //console.log('123'+code)
            },
            error:function (result) {
                var code = 0
                var msg = '服务器错误';
                changeText(msg, code)

            }
        });
    }

</script>
